package com.bowos.zmado.model;

import java.sql.Timestamp;

import com.orifine.orm.annotation.Column;
import com.orifine.orm.annotation.Id;
import com.orifine.orm.annotation.Length;
import com.orifine.orm.annotation.NotNull;
import com.orifine.orm.annotation.Table;
import com.orifine.orm.type.Address;

/**
 * 主题
 * @author Administrator
 *
 */
@Table
public class Subject {
	@Id
	@Column
	private Integer id;
	
	/**
	 * 主题名称
	 */
	@Column
	@Length(200)
	private String name;
	
	/**
	 * 主题所属的版块
	 */
	@Column
	@NotNull
	private Forum forum;
	
	/**
	 * 预览图片地址
	 */
	@Column
	private Address previewIamgeAddress;
	
	/**
	 * 是否精华的主题
	 */
	@Column
	private Boolean marrow;
	
	/**
	 * 作者/发表者
	 */
	@Column
	private User author;
	
	/**
	 * 发布日期
	 */
	@Column
	private Timestamp publishDate;
	
	/**
	 * 主题楼主内容
	 */
	@Column
	@Length(20000)
	private String content;
	
	/**
	 * 用户浏览次数
	 */
	@Column
	private Integer userBrowseCount;
	
	/**
	 * 游客浏览次数
	 */
	@Column
	private Integer visitorBrowseCount;
	
	/**
	 * 回复帖数量
	 */
	@Column
	private Integer postCount;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Forum getForum() {
		return forum;
	}

	public void setForum(Forum forum) {
		this.forum = forum;
	}

	public Address getPreviewIamgeAddress() {
		return previewIamgeAddress;
	}

	public void setPreviewIamgeAddress(Address previewIamgeAddress) {
		this.previewIamgeAddress = previewIamgeAddress;
	}

	public Boolean getMarrow() {
		return marrow;
	}

	public void setMarrow(Boolean marrow) {
		this.marrow = marrow;
	}

	public User getAuthor() {
		return author;
	}

	public void setAuthor(User author) {
		this.author = author;
	}

	public Timestamp getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(Timestamp publishDate) {
		this.publishDate = publishDate;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getUserBrowseCount() {
		return userBrowseCount;
	}

	public void setUserBrowseCount(Integer userBrowseCount) {
		this.userBrowseCount = userBrowseCount;
	}

	public Integer getVisitorBrowseCount() {
		return visitorBrowseCount;
	}

	public void setVisitorBrowseCount(Integer visitorBrowseCount) {
		this.visitorBrowseCount = visitorBrowseCount;
	}

	public Integer getPostCount() {
		return postCount;
	}

	public void setPostCount(Integer postCount) {
		this.postCount = postCount;
	}
}
